package com.yhq.spring.event.builtin;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

/**
 * @author hqyin
 * @date 2023/3/14 11:24 上午
 */
@Slf4j
@Component
public class TestContextClosedEventListener implements ApplicationListener<ContextClosedEvent> {
    @Override
    public void onApplicationEvent(ContextClosedEvent event) {
        log.info("==================>receive ContextClosedEvent event:{}",event.getSource());
    }
}
